from sys import stdin, stdout
n, k = map(int, stdin.readline().split())
bits = list(map(lambda i: n >> i & 1, range(33)))
if k > n or k < sum(bits):
print("NO")
else:
ans = {i: bits[i] for i in range(33)}
curr = sum(bits)
for pow in range(32, 0, -1):
if curr == k:
break
smt = min(ans[pow], k - curr)
curr += smt
ans[pow - 1] += 2 * smt
ans[pow] -= smt
print("YES")
check = 0
for i in range(33):
pp = str(2**i)
for app in range(ans[i]):
check += int(pp)
stdout.write(pp)
stdout.write(" ")
print()
#include <bits/stdc++.h>
using namespace std;
#define SR() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl '\n'
#define MOD 1000000007
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define all(s) s.begin(), s.end()
const double pi = acos(-1);
typedef long long ll;
typedef unsigned long long ull;
void File()
{
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
}
int main()
{
SR();
ll n, m;
cin >> n >> m;
bitset<32> aa = n;
// cout << aa << endl;
priority_queue<ll> ppq;
for (int i = 0; i < 32; i++)
{
if (aa[i] == 1)
{
ppq.push(pow(2, i));
}
}
ll cnt = ppq.size();
if (m < cnt || m > n)
cout << "NO" << endl;
else
{
cout << "YES" << endl;
while (cnt++ != m)
{
ll ini = ppq.top();
ppq.pop();
ppq.push(ini / 2);
ppq.push(ini / 2);
}
while(!ppq.empty())
{
cout << ppq.top() << " ";
ppq.pop();
}
cout << endl;
}
return 0;
}
137. Single Number II | 130. Surrounded Regions |
129. Sum Root to Leaf Numbers | 120. Triangle |
102. Binary Tree Level Order Traversal | 96. Unique Binary Search Trees |
75. Sort Colors | 74. Search a 2D Matrix |
71. Simplify Path | 62. Unique Paths |
50. Pow(x, n) | 43. Multiply Strings |
34. Find First and Last Position of Element in Sorted Array | 33. Search in Rotated Sorted Array |
17. Letter Combinations of a Phone Number | 5. Longest Palindromic Substring |
3. Longest Substring Without Repeating Characters | 1312. Minimum Insertion Steps to Make a String Palindrome |
1092. Shortest Common Supersequence | 1044. Longest Duplicate Substring |
1032. Stream of Characters | 987. Vertical Order Traversal of a Binary Tree |
952. Largest Component Size by Common Factor | 212. Word Search II |
174. Dungeon Game | 127. Word Ladder |
123. Best Time to Buy and Sell Stock III | 85. Maximal Rectangle |
84. Largest Rectangle in Histogram | 60. Permutation Sequence |